const { defineConfig } = require('@vue/cli-service')
const BASE_URL = process.env.NODE_ENV !== 'development'
  ? './'
  : '/'
module.exports = defineConfig({
  devServer:{
    port: process.env.PORT || 8080
  },
  lintOnSave: false,
  productionSourceMap: false, // 生产环境不产生未加密的map文件
  transpileDependencies: true,
  publicPath: BASE_URL,
  chainWebpack: config => {
    config
    .plugin('html')
    .tap(args => {
        args[0].title = '博乐市农业大数据平台'
        return args
    })
  }
})